{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/builder/css/base.css" media="all">
<style>
    .layui-table-view .layui-table[lay-size=sm] .layui-table-cell {
        height: auto !important;
    }

    .products {
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .products span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .products:not(:last-child) {
        border-bottom: 1px #eee dashed;
    }

    .products img {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        margin-right: 5px;
        cursor: pointer;
    }

    .tableInput {
        height: 40px !important;
        line-height: 40px !important;
    }
</style>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
    <div class="layui-card">
        {if $search}
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="nav_search">
                {table:search field='$search'/}
            </div>
        </div>
        {/if}
        <div class="layui-card-body">
            <div style="display: flex;align-items: center;justify-content: space-between">
                <div class="layui-btn-container" style="flex: 1">
                    {foreach name="top_buttons" item="vo"}
                    {if $vo.title == '导出'}
                    <a class="{$vo.class}" data-json='<?php echo json_encode($vo);?>' data-title="{$nav.s_nav}"
                       data-url="{:url('getList',array_merge($Request.param,$extra_map))}&export=1"
                       onclick="{$vo.onclick}">
                        <i class="layui-icon {$vo.icon}"></i>{$vo.title}
                    </a>
                    {else}
                    <a class="{$vo.class}" data-json='<?php echo json_encode($vo);?>' onclick="{$vo.onclick}">
                        <i class="layui-icon {$vo.icon}"></i>{$vo.title}
                    </a>
                    {/if}
                    {/foreach}
                </div>
                {if $census}
                <div class="layui-row statistics_list"></div>
                {/if}
            </div>
            <table id="formTable" lay-filter="table"></table>
        </div>
    </div>
</div>
</body>
<!-- 渲染附加的html -->
<?php echo $extra_html;?>
<input type="hidden" id="tableColumns" value='<?php echo json_encode($columns);?>'/>
<input type="hidden" id="tableUniqueStr" value="{$extra_map.tableUniqueStr}"/>
<input type="hidden" id="tableUniqueTitle" value="{$nav?$nav.s_nav:''}"/>
{include file="public/footer" /}
{foreach name="js_url" item="vo"}
<script type="text/javascript" src="/static/admin/form/js/{$vo}.js"></script>
{/foreach}
<script>
    $(function () {
        tableRender("#formTable", JSON.parse($("#tableColumns").val()), "{:url('getList', array_merge($Request.param,$extra_map))}", {$totalRow})
    })
</script>
</html>